define(['underscore', 'backbone'], function(_, backbone) {
    return backbone.Model.extend({
        toPathParam: function() {
            var data = [];
            var items = this.get('items');
            if (items.length == 0) {
                data.push({
                    storageType: this.get('storageType'),
                    id: this.get('id')
                });
            }
            else {
                _.each(items, function(item) {
                    data.push({
                        storageType: item['storageType'],
                        id: item['id']
                    });
                });
            }
            return data;
        }
    });
});

